package com.cly.feign;

import com.cly.domain.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "order-service")
public interface PayOrderFeign {

    /**
     * 根据订单号 获取订单对象
     * @param orderNum
     * @return
     */
    @GetMapping("p/myOrder/getOrderByNum")
    Order getOrderByNum(@RequestParam String orderNum);

    /**
     * 修改订单状态 已经支付
     * @param orderNum
     */
    @PostMapping("p/myOrder/changeOrderStatus")
    void changeOrderStatus(@RequestBody String orderNum);
}
